﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace FootBallMatchProject.Piography.Client
{
    public partial class PlayerInfoForm : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            DataClassLayer.Player player = new DataClassLayer.Player();
            DataClassLayer.PlayerCollection players = new DataClassLayer.PlayerCollection();
            if (Request.QueryString["ID"] != null &&
                Request.QueryString["ID"].ToString() != "")
            {
                player.ID = int.Parse(Request.QueryString["ID"].ToString());
            }
            else
            {
                player.ID = 1;
            }
            DataTable table = players.FillList(player);
            if (table.Rows.Count == 1)
            {
                PlayerView.DataSource = table;
                PlayerView.DataBind();
            }
        }
    }
}